package com.htt.bms.domain.sys;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.time.LocalDateTime;
import java.util.List;

/**
 * @author 侯婷婷
 * @version 1.0
 * @description 权限/角色
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@Builder
@TableName(value = "sys_role")
@ApiModel("权限")
public class SysRole {
    @ApiModelProperty("主键id")
    @TableId(type = IdType.AUTO)
    private Integer id;//主键id

    @ApiModelProperty("角色名称")
    private String name;//role名称

    @ApiModelProperty("类型")
    private Integer type;//类型
    @TableField(exist = false)
    private String typeName;//类型名称

    @ApiModelProperty("状态")
    private Integer status;//状态
    @TableField(exist = false)
    private String statusName;//状态名称

    @ApiModelProperty("创建人")
    private String creator;//创建人

    @ApiModelProperty("更新时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", locale = "zh", timezone = "GMT+8")
    private LocalDateTime updateTime;//更新时间

    @ApiModelProperty("创建时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", locale = "zh", timezone = "GMT+8")
    private LocalDateTime createTime;//创建时间

    @ApiModelProperty("用户IDS")
    @TableField(exist = false)
    private List<String> userIds;
}
